package com.yzj.android.service.impl;

import com.yzj.Bean.Cake;
import com.yzj.android.dao.CakeDao;
import com.yzj.android.dao.impl.CakeDaoImpl;
import com.yzj.android.service.CakeService;

import java.util.List;

public class CakeServiceImpl implements CakeService {
    private CakeDao cakeDao = new CakeDaoImpl();
    @Override
    public int addCake(Cake cake) {
        return cakeDao.addCake(cake);
    }

    @Override
    public int deleteCakeById(Integer id) {
        return cakeDao.deleteCakeById(id);
    }

    @Override
    public int updateCake(Cake cake) {
        return cakeDao.updateCake(cake);
    }

    @Override
    public Cake queryCakeById(Integer id) {
        return cakeDao.queryCakeById(id);
    }

    @Override
    public List<Cake> queryCakes() {
        return cakeDao.queryCakes();
    }

    @Override
    public List<Cake> queryCakeinfo(String string) {
        return cakeDao.queryCake(string);
    }
}
